package com.taobao.txc.parser.b.c;

import com.taobao.txc.parser.struct.b;
import java.sql.SQLException;
import java.util.Date;

public class l
{
  public static void a(Object paramObject, StringBuilder paramStringBuilder)
  {
    if (paramObject == null)
    {
      paramStringBuilder.append("null");
      return;
    }
    if (String.class.isAssignableFrom(paramObject.getClass()))
    {
      String str = (String)paramObject;
      paramStringBuilder.append("'" + str.replaceAll("'", "''") + "'");
    }
    else if (Date.class.isAssignableFrom(paramObject.getClass()))
    {
      paramStringBuilder.append("'" + paramObject + "'");
    }
    else if (Number.class.isAssignableFrom(paramObject.getClass()))
    {
      paramStringBuilder.append(paramObject);
    }
    else if (b.class.isAssignableFrom(paramObject.getClass()))
    {
      paramStringBuilder.append("'" + paramObject + "'");
    }
    else if (paramObject == h.a())
    {
      paramStringBuilder.append("null");
    }
    else
    {
      throw new SQLException("" + paramObject.getClass());
    }
  }
  
  public static void a(String paramString, Object paramObject, StringBuilder paramStringBuilder)
  {
    if (paramObject == null) {
      return;
    }
    paramStringBuilder.append(paramString);
    paramStringBuilder.append(" = ");
    if (String.class.isAssignableFrom(paramObject.getClass())) {
      paramStringBuilder.append("'" + paramObject + "'");
    } else if (Date.class.isAssignableFrom(paramObject.getClass())) {
      paramStringBuilder.append("'" + paramObject + "'");
    } else if (Number.class.isAssignableFrom(paramObject.getClass())) {
      paramStringBuilder.append(paramObject);
    } else if (b.class.isAssignableFrom(paramObject.getClass())) {
      paramStringBuilder.append("'" + paramObject + "'");
    } else if (paramObject == h.a()) {
      paramStringBuilder.append("null");
    } else {
      throw new SQLException("" + paramObject.getClass());
    }
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.taobao.txc.parser.b.c.l
 * JD-Core Version:    0.7.0.1
 */